package com.kelaite.procurement.service;

import java.util.List;

import com.kelaite.procurement.dto.PipelinePublicDTO;
import com.kelaite.procurement.entity.TPipelineHeader;
import com.kelaite.procurement.entity.TPipelinePublic;
import com.kelaite.procurement.entity.TVendor;

public interface PipelinePublicService {
	public TPipelinePublic save(TPipelinePublic persistence);

	public void deleteByPrimaryKey(Long id);

	public void deleteByObject(TPipelinePublic persistence);

	public TPipelinePublic getObject(Long id);

	public List<TPipelinePublic> getAll();

	public List<TPipelinePublic> getByProperty(String property, Object value);

	public List<PipelinePublicDTO> getPipelinePublicListByPipelineId(
			Long pipelineId);

	public int updatePipelinePublic(List<PipelinePublicDTO> pipelinePublicList);

	public TPipelinePublic getPipelinePublicByPipelineIdAndWinflag(
			Long pipelineId, boolean suggestedWin, boolean finalWin);
	
	/**
	 * 查找是否已经竞标过
	 * @param pipelineHeader
	 * @param vendor
	 * @return
	 */
	public boolean ifAlreadyPipelined(TPipelineHeader pipelineHeader, TVendor vendor);
	
	
	public List<Long> findPipelineHeaderIdsByVendor(TVendor vendor);
	
	public TPipelinePublic findByPipelineHeaderAndVendor(TPipelineHeader pipelineHeader, TVendor vendor);
	
}
